function addStatsbject() {
   stats = new Stats();
   stats.setMode(0);
   stats.domElement.style.position = 'absolute';
   stats.domElement.style.left = '0px';
   stats.domElement.style.top = '0px';
   document.body.appendChild(stats.domElement);
}

function addControlGui (controlObject) {
  var gui = new dat.GUI();
  gui.add(controlObject, 'rotationSpeed', -0.10, 0.10);
}

function drawCoordinateAxies (scene) {
  drawXAxis(scene);
  drawYAxis(scene);
  drawZAxis(scene);
}

function drawXAxis (scene) {
  drawLine(scene, -100, 0, 0, 100, 0, 0);
}

function drawYAxis (scene) {
  drawLine(scene, 0, -100, 0, 0, 100, 0);
}

function drawZAxis (scene) {
  drawLine(scene, 0, 0, -100, 0, 0, 100);
}

function drawLine (scene, x1, y1, z1, x2, y2, z2) {
  var geometry = new THREE.Geometry();
  var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );
  var color1 = new THREE.Color( 0x0000FF ), color2 = new THREE.Color( 0xFF0000 );

  // 线的材质可以由2点的颜色决定
  var p1 = new THREE.Vector3(  x1, y1, z1 );
  var p2 = new THREE.Vector3(  x2, y2, z2 );
  geometry.vertices.push(p1);
  geometry.vertices.push(p2);
  geometry.colors.push( color1, color2 );

  var line = new THREE.Line( geometry, material, THREE.LinePieces );
  scene.add(line);
}
